home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 9 / PC World Interactive 9 - Temmuz 1998.iso / share / internet / hot / top.z / osl.ofr < prev    next >
Text File  |  1997-10-01  |  10KB  |  332 lines

  1. # OpenMarket, Inc
  2. # Tue Mar 19 15:33:57 EST 1996
  3. #
  4. # $Id: OSL.ofr,v 1.35 1996/07/08 13:59:01 henry Exp $
  5. #
  6. # An offer description for a digital offer expected by
  7. #  Open Market Secure Link. 
  8.  
  9.  
  10. offer {
  11.     name "OM-Secure Link 2.0 Offer Description"
  12.     date "Wed May  8 18:18:30 EDT 1996"
  13.     type env
  14.     version {OSL 2.01 OMT 2.2}
  15.     author "OpenMarket Secure Link Software Developer's Kit"
  16.     generated "vi"
  17.         translator {<!--#exec cmd="mdohref %s"-->}
  18.     brand http://www.openmarket.com/offerlibrary/omi.gif
  19.  
  20. # OSL designates a store as an integer of length 8 (or less).
  21. # Most applications will want to call it a 'store', but OM-Transact calls
  22. # stores 'key identifiers', for historical reasons.
  23. #
  24. # The 'prohibited' expression is not necessary. If not stated
  25. #  explicitly, a row's value is neither required *nor* prohibited.
  26. #  In other words, its optional.
  27. #
  28. # By convention (and by convention only), the type information is
  29. #  usually described as satisfying a regular expression and any
  30. #  additional constraints are stated in the optional constraint
  31. #  row attribute.
  32.  
  33. row {
  34.     name StoreID
  35.     comment "The identification for your store."
  36.      tag kid
  37.      type {expr {[regexp {^[0-9]+$} [getrow StoreID valuedefault]] && [expr {[string length [getrow StoreID valuedefault]] <= 8}] }}
  38. }
  39.  
  40. row {
  41.     name  Name 
  42.     tag   desc 
  43.     comment "product name or short description"
  44.     prohibited {expr {[string compare [getrow Type valuedefault] none] == 0} }
  45.     required {expr { [string compare [getrow Type valuedefault] none] != 0 } }
  46.  
  47.  
  48. row {
  49.     name Type
  50.     tag  ""
  51.     comment "type of product being offered"
  52.     type {regexp {^(tangible|online|none)$} [getrow Type valuedefault]}
  53.     required {return 1}
  54. }
  55.  
  56. row {
  57.     name type
  58.     tag  goodstype
  59.     comment "this is for internal use only"
  60.     prohibited {return 1}
  61. }
  62.  
  63. row {
  64.     name  UniqueID
  65.     tag domain
  66.     comment "unique product identification code, e.g. model number, SKU. For online goods, string or number associated with FulfillmentURL that fulfillment server uses to identify the scope, region, or domain of the online content"
  67.  
  68.     constraint { if {[string length [getrow UniqueID valuedefault]] > 40 } {return 0} elseif {![string match [getrow Subscription valuedefault] 1]} {return 1} elseif {![regexp {^[0-9][0-9]*$} [getrow UniqueID valuedefault]]} {return 0} elseif {[getrow UniqueID valuedefault] <= 255} {return 1} else {return 0} }
  69.     prohibited {expr {[string compare [getrow Type valuedefault] none] == 0} }
  70.     required {expr { [string compare [getrow Type valuedefault] none] != 0 } }
  71.  
  72. row {
  73.     name TaxClass
  74.     tag ProdCode
  75.     comment "product classification code used for sales tax calculation"
  76.     type {expr { [regexp {^[0-9]+$} [getrow TaxClass valuedefault] ] && [expr {[string length [getrow TaxClass valuedefault]] <= 5}] } }
  77.     prohibited {expr {[string compare [getrow Type valuedefault] none] == 0} }
  78.  
  79.  
  80. row {
  81.     name  ShippingWeight
  82.     tag weight
  83.     comment "product weight for computing a shipping charge"
  84.     type {regexp {^[1-9][0-9]*$} [getrow ShippingWeight valuedefault]}
  85.     prohibited {expr {![string match [getrow Type valuedefault] tangible] || [boundrow ShippingCharge value] || ![string compare [getrow Type valuedefault] none] } }
  86.  
  87. row {
  88.     name Detail
  89.     tag detail
  90.     comment "descriptive information; reported on merchant's SmartStatement"
  91.     prohibited {expr { [string match [getrow Subscription valuedefault] 1] || [string match [getrow Type valuedefault] none] } }
  92.  
  93.  
  94. row {
  95.     name StatusURL
  96.     tag ""
  97.     comment "merchant-suppied order status page that supercedes the OM-Transact status page"
  98.     type {regexp {^((http|https)://[^:/]+(:[0-9]+)?)?(.*)} [getrow StatusURL valuedefault]}
  99.     prohibited {expr {![string match [getrow Type valuedefault] tangible]}}
  100.  
  101. row {
  102.     name status_url
  103.     tag url
  104.     comment "this is for internal use only"
  105.     prohibited {return 1}
  106. }
  107.  
  108.  
  109.  
  110. #
  111. #  !!!! IMPORTANT
  112. #  !!!! This row needs special treatment in libdo
  113. #  !!!! Be extremly careful when you modify it.
  114. #
  115. row {
  116.     name FulfillmentURL
  117.     tag ""
  118.     comment "on-line location of the product; or the first page of a subscription"
  119.     type {regexp {^((http|https)://[^:/]+(:[0-9]+)?)?(.*)} [getrow FulfillmentURL valuedefault]}
  120.     required {string match [getrow Type valuedefault] online}
  121.     prohibited {expr {![string match [getrow Type valuedefault] online]}}
  122.  
  123. row {
  124.     name region_url
  125.     tag url 
  126.     comment "this is for internal use only"
  127.     prohibited {return 1}
  128.  
  129. row {
  130.     name subs_url
  131.     tag detail.url 
  132.     comment "this is for internal use only"
  133.     prohibited {return 1}
  134.  
  135. row {
  136.     name url
  137.     tag url 
  138.     comment "this is for internal use only"
  139.     prohibited {return 1}
  140.  
  141. row {
  142.     name fmt
  143.     tag fmt 
  144.     comment "this is for internal use only"
  145.  
  146. row {
  147.     name  Subscription
  148.     tag ""
  149.     comment "is online product a subscription?"
  150.     type {regexp {^[0|1]$} [getrow Subscription valuedefault]}
  151.     prohibited {expr {![string match [getrow Type valuedefault] online]}}
  152.  
  153. #
  154. #  !!!! IMPORTANT
  155. #  !!!! This row needs special treatment in libdo
  156. #  !!!! Be extremly careful when you modify it.
  157. #
  158. row {
  159.     name SubscriptionDuration
  160.     tag ""
  161.     comment "length of subscription in months"
  162.     type {regexp {^[1-9][0-9]*$} [getrow SubscriptionDuration valuedefault]}
  163.     required {string match [getrow Subscription valuedefault] 1}
  164.     prohibited {expr {![string match [getrow Subscription valuedefault] 1]}}
  165.  
  166. row {
  167.     name subs_duration
  168.     tag detail.duration
  169.     comment "this is for internal use only"
  170.     prohibited {return 1}
  171.  
  172. row {
  173.     name renew
  174.     tag renew
  175.     comment "this is for internal use only"
  176.     prohibited {return 1}
  177.  
  178. row {
  179.     name AutoRenew
  180.     tag ""
  181.     comment "subscription is automatically renewed when it expires"
  182.     type {regexp {^[0|1]$} [getrow AutoRenew valuedefault]}
  183.     prohibited {expr {![string match [getrow Subscription valuedefault] 1]}}
  184.  
  185. row {
  186.     name RefundPolicy
  187.     tag detail.refund 
  188.     comment "subscription refund policy"
  189.     type {regexp {^(none|prorate|full)$} [getrow RefundPolicy valuedefault]}
  190.     prohibited {expr {![string match [getrow Subscription valuedefault] 1]}}
  191.  
  192. row {
  193.     name Currency
  194.     tag cc
  195.     comment "currency code, three digits, ISO 4217."
  196.     type { regexp {^[0-9A-Za-z][0-9A-Za-z][0-9A-Za-z]?$} [getrow Currency valuedefault] }
  197. }
  198.  
  199. row {
  200.     name Price
  201.     tag amt
  202.     comment "offer price"
  203.     type {regexp {^[0-9]+(\.[0-9]?[0-9]?)?$} [getrow Price valuedefault] }
  204.     prohibited {string match [getrow Type valuedefault] none }
  205.     required {expr { [string compare [getrow Type valuedefault] "none"] != 0 } }
  206.  
  207. row {
  208.     name Quantity
  209.     tag qty
  210.     comment "number of items being purchased"
  211.     type {regexp {^[1-9][0-9]*$} [getrow Quantity valuedefault]}
  212.     prohibited {string match [getrow Type valuedefault] none }
  213.  
  214. row {
  215.     name MaximumQuantity
  216.     tag maxqty
  217.     comment "maximum number of items that can be purchased"
  218.     type {regexp {^[0-9]+$} [getrow MaximumQuantity valuedefault]}
  219.     constraint {expr {[getrow MaximumQuantity valuedefault] >= [getrow Quantity valuedefault]} } 
  220.     prohibited {string match [getrow Type valuedefault] none }
  221.  
  222. row {
  223.     name  InstallmentCount
  224.     tag n_inst
  225.     comment "number of payments"
  226.     type {expr { [regexp {^[1-9][0-9]*$} [getrow InstallmentCount valuedefault] ] && [expr {! [string match [getrow InstallmentCount valuedefault] "1"] }] } }
  227.     prohibited {expr {![string match [getrow Subscription valuedefault] 1] || [string match [getrow AutoRenew valuedefault] 1] }}
  228.     required { expr [boundrow InstallmentPeriod valuedefault] }
  229.  
  230. row {
  231.     name InstallmentPeriod
  232.     tag inst
  233.     comment "number of months between payments"
  234.     type {regexp {^[1-9][0-9]*$} [getrow InstallmentPeriod valuedefault]}
  235.     prohibited { expr {![boundrow InstallmentCount valuedefault]} }
  236.     required { expr [boundrow InstallmentCount valuedefault] }
  237.  
  238. row {
  239.     name TrialPeriod
  240.     tag free
  241.     comment "period before billing begins"
  242.     type {regexp {^[0-9]+(d|w|m)?$} [getrow TrialPeriod valuedefault]}
  243.     prohibited {expr {![string match [getrow Subscription valuedefault] 1]} }
  244.  
  245. row {
  246.     name GracePeriod
  247.     tag grace
  248.     comment "days before billing is performed"
  249.     type {regexp {^[0-9]+$} [getrow GracePeriod valuedefault]}
  250.     prohibited {expr {![string match [getrow Subscription valuedefault] 1]} }
  251.  
  252. row {
  253.     name ShippingCharge
  254.     tag freight
  255.     comment "fixed shipping charge for the product"
  256.     type {regexp {^[0-9]*(\.[0-9]?[0-9]?)?$} [getrow ShippingCharge valuedefault]}
  257.     prohibited {expr {![string match [getrow Type valuedefault] tangible] || [boundrow ShippingWeight value]} }
  258.  
  259. row {
  260.     name Operation
  261.     tag op
  262.     comment "buyer action"
  263.     type {regexp {^(add|addview|view)$} [getrow Operation valuedefault] }
  264.     prohibited { if {[string match [getrow Type valuedefault] none]} {expr {![string match [getrow Operation valuedefault] view]} } else {expr { [string match [getrow Operation valuedefault] view ] }} }
  265.     required {expr {[string match [getrow Type valuedefault] none]} }
  266.  
  267. row {
  268.     name AccountRequired
  269.     tag acctreqd
  270.     comment "Is OM-Transact account required"
  271.     type {regexp {^[0|1]$} [getrow AccountRequired valuedefault] }
  272.     prohibited {string match [getrow Type valuedefault] none }
  273.  
  274. row {
  275.     name OfferExpires
  276.     tag valid
  277.     comment "shelf life of the offer, i.e., date after which the offer will no longer be honered by the merchant"
  278.     type {regexp {^[1-9][0-9]*$} [getrow OfferExpires valuedefault]}
  279.     prohibited {string match [getrow Type valuedefault] none }
  280.  
  281. row {
  282.     name ReceiptDuration
  283.     tag expire
  284.     comment "access window, i.e., duration in seconds that the buyer has to access an online product from the time the Digital Receipt is created"
  285.     type {regexp {^[1-9][0-9]*$} [getrow ReceiptDuration valuedefault]}
  286.     prohibited {expr {![string match [getrow Type valuedefault] online]}}
  287.  
  288. row {
  289.     name OfferURL
  290.     tag ""
  291.     type {regexp {^((http|https)://[^:/]+(:[0-9]+)?)?(.*)} [getrow OfferURL valuedefault]}
  292.     required {expr 1}
  293.  
  294. row {
  295.     name curl
  296.     tag curl
  297.     comment "this is for internal use only"
  298.     prohibited {return 1}
  299. }
  300.  
  301.